package org.seckill.dto;

/**
 * 暴露秒杀地址Dto =>方便service返回数据的封装
 *
 * @author Simple
 * @create 2017-02-10 10:03
 **/
public class Exposer {

    /**
     * 是否开启秒杀
     */
    private boolean exposed;
    /**
     * md5加密
     */
    private String md5;
    private long seckillId;
    /**
     * 系统当前时间(毫秒)
     */
    private long now;
    /**
     * 开启时间
     */
    private long start;
    /**
     * 结束时间
     */
    private long end;

    /**
     * 秒杀开启后 返回的数据
     *
     * @param exposed
     * @param md5
     * @param seckillId
     */
    public Exposer(boolean exposed, String md5, long seckillId) {
        this.exposed = exposed;
        this.md5 = md5;
        this.seckillId = seckillId;
    }

    /**
     * 秒杀未开启 返回的数据
     *
     * @param exposed
     * @param seckillId
     * @param now
     * @param start
     * @param end
     */
    public Exposer(boolean exposed, long seckillId, long now, long start, long end) {
        this.exposed = exposed;
        this.seckillId = seckillId;
        this.now = now;
        this.start = start;
        this.end = end;
    }

    public Exposer(boolean exposed, long seckillId) {
        this.exposed = exposed;
        this.seckillId = seckillId;
    }

    public boolean isExposed() {
        return exposed;
    }

    public void setExposed(boolean exposed) {
        this.exposed = exposed;
    }

    public String getMd5() {
        return md5;
    }

    public void setMd5(String md5) {
        this.md5 = md5;
    }

    public long getSeckillId() {
        return seckillId;
    }

    public void setSeckillId(long seckillId) {
        this.seckillId = seckillId;
    }

    public long getNow() {
        return now;
    }

    public void setNow(long now) {
        this.now = now;
    }

    public long getStart() {
        return start;
    }

    public void setStart(long start) {
        this.start = start;
    }

    public long getEnd() {
        return end;
    }

    public void setEnd(long end) {
        this.end = end;
    }
}
